﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyBlog.ServiceInterface;
using MyBlog.Model;
using MyBlog.Common;
using MyBlog.BusinessInterface;

namespace MyBlog.Service
{
    public class MsgReplyService : IMsgReplyService
    {
        IBusinessMsgReply _business;

        public MsgReplyService(IBusinessMsgReply business)
        {
            _business = business;
        }
        public void Add(Model.MsgReplyModel model)
        {
            _business.Add(model);
        }

        public void AddRange(IEnumerable<Model.MsgReplyModel> models)
        {
            throw new NotImplementedException();
        }

        public void Update(Model.MsgReplyModel model)
        {
            _business.Update(model);
        }

        public void Delete(params object[] primaryKey)
        {
            _business.Delete(primaryKey);
        }

        public void Delete(Model.MsgReplyModel model)
        {
            _business.Delete(model);
        }

        public void DeleteRange(IEnumerable<Model.MsgReplyModel> models)
        {
            _business.DeleteRange(models);
        }

        public Model.MsgReplyModel Get(params object[] primaryKey)
        {
            return _business.Get(primaryKey);
        }

        public Model.MsgReplyModel Get(Model.MsgReplyModel model)
        {
            return _business.Get(model);
        }

        public List<Model.MsgReplyModel> GetAll(bool isTracking = true)
        {
            return _business.GetAll(isTracking);
        }

        public List<Model.MsgReplyModel> GetAll(Model.MsgReplyModel model, bool isTracking = true)
        {
            return _business.GetAll(model,isTracking);
        }


        public List<Model.MsgReplyModel> GetAll(Model.MsgReplyModel model, int page, int size, out int total, bool isTracking = true)
        {
            throw new NotImplementedException();
        }

        public void AddAgree(int id, string account)
        {
            _business.AddAgree(id, account);
        }
    }
}
